package com.pacai.homework;

/**
 * @author pacai
 * @version 1.0
 */
public class HomeWork03 {
    public static void main(String[] args) {
        System.out.println(new Book(200).updatePrice());
    }

}

class Book{
    private double price;

    public Book(double price) {
        this.price = price;
    }

    public double updatePrice(){
        if(price > 150){
            price = 150;
        }else if(price > 100){
            price = 100;
        }
        return price;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}

